package org.etsi.ttcn.tci;

public interface RecordOfValue extends Value {

/**
 *  Returns the value of the record of at position if position is between zero and length-1,
 *  the distinct value null otherwise. The return value is the common abstract base type Value,
 *  as a record of can have fields of any type defined in TTCN-3.
 */
    public Value getField(int position) ;

/**
 *  Sets the field at position to value. In case position is greater than (length-1) the record of will be
 *  extended to have the length (position + 1). The record of elements between the original position at length
 *  and position-1 will be set to OMIT. No assumption shall be made on how a field is stored in a record of.
 *  An internal implementation might choose to store a reference to this value or to copy the value.
 *  It is save to assume that the value will be copied. Therefore it should be relied on that subsequent
 *  modifications of value will not be considered in the record of.
 */
    public void  setField(int position, Value value) ;

/**
 *  Appends the value at the end of the record of, i.e. at position length. No assumption shall be made on how
 *  a field is stored in a record of. An internal implementation might choose to store a reference to this value
 *  or to copy the value. It is save to assume that the value will be copied. Therefore it should be relied on
 *  that subsequent modifications of value will not be considered in the record of.
 */
    public void  appendField(Value value) ;

/**
 *  This operation will return the Type of the elements of this record of.
 */
    public Type  getElementType() ;

/**
 *  Returns the actual length of the record of value, zero if the record of value is OMIT.
 */
    public int   getLength() ;

/**
 *  Set the length of the record of to len. If len is greater than the original length, newly created elements
 *  have the value OMIT. If len is less or equal than the original length this operation will be ignored.
 */
    public void  setLength(int len) ;

}// RecordOfValue
